﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace UtilsORM.MySqlData;

/// <summary>
/// 设备
/// </summary>
[Index("l_c_guid", Name = "idxcguid")]
[Index("l_execute_type", Name = "idxexecute_type")]
[Index("l_cu_guid", Name = "idxlcuguid")]
[Index("l_guid", Name = "idxlguid")]
[Index("l_status", Name = "idxstatus")]
[Index("l_auto_run", Name = "l_auto_run")]
[Index("l_auto_run_join", Name = "l_auto_run_jion")]
[Index("l_p_guid", Name = "l_p_guid")]
public partial class iot_device_linkage
{
    [Key]
    public long l_id { get; set; }

    public string l_guid { get; set; }

    [StringLength(50)]
    public string l_title { get; set; }

    /// <summary>
    /// 条件类型and,or
    /// </summary>
    [StringLength(50)]
    public string l_condition_type { get; set; }

    /// <summary>
    /// 用户名
    /// </summary>
    [StringLength(50)]
    public string l_cu_guid { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? l_add_time { get; set; }

    /// <summary>
    /// 0正常，1无效
    /// </summary>
    public int l_status { get; set; }

    /// <summary>
    /// 执行结果说明
    /// </summary>
    [StringLength(255)]
    public string l_execute_result { get; set; }

    /// <summary>
    /// 最近执行时间
    /// </summary>
    [Column(TypeName = "datetime")]
    public DateTime? l_execute_time { get; set; }

    /// <summary>
    /// client
    /// </summary>
    [StringLength(50)]
    public string l_c_guid { get; set; }

    [Column(TypeName = "datetime")]
    public DateTime? l_mod_time { get; set; }

    /// <summary>
    /// 0自动执行，1手工调用执行,2Fast单通道执行
    /// </summary>
    public int l_execute_type { get; set; }

    /// <summary>
    /// 0否，1是产品型号,2由模板生成的产品
    /// </summary>
    public int? l_is_template { get; set; }

    /// <summary>
    /// 产品iot_device_product
    /// </summary>
    [StringLength(50)]
    public string l_p_guid { get; set; }

    /// <summary>
    /// 0启动，1不启动
    /// </summary>
    public int? l_auto_run { get; set; }

    /// <summary>
    /// 0不参与自动配置，1参与自动配置
    /// </summary>
    public int? l_auto_run_join { get; set; }

    /// <summary>
    /// 产品序号
    /// </summary>
    public int? l_p_model_no { get; set; }
}
